from apps.extensions import db
from apps.models import Options
from flask import Flask
import logging
def init_theme(app: Flask):
    """
    初始化主题配置项
    """
    with app.app_context():
        options = db.session.query(Options).filter(Options.option_name == "current_theme").first();
        app.config["DEFAULT_THEME"] = options.option_value
        logging.info("配置主题为:" + options.option_value)
